package viz.example.webviewdemo

import android.content.Context
import android.text.TextUtils
import android.util.Log
import android.webkit.JavascriptInterface
import org.greenrobot.eventbus.EventBus


/**
 * @title: MyJavascriptInterface
 * @projectName WebViewDemo
 * @description:
 * @author zhangwei
 * @date 2021/6/16 12:47
 */
class MyJavascriptInterface(private val context: Context?) {
    @JavascriptInterface
    fun invoke(si: Int, fi: Int) {
        val intent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
        context.startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE)
    }
}